<template>
  <el-timeline >
    <el-timeline-item
      v-for="(timeline, index) in taskLogs"
      :key="index"
      hollow="true"
      size="large"
      :icon="timeline.icon"
      :color="timeline.color"
      :timestamp="timeline.dataTime"
      placement="top"
    >
      {{ timeline.content }}
    </el-timeline-item>
  </el-timeline>
</template>

<script>
module.exports = {
  name: "nodeLog",
  props: {
	  logs: {
	      type: Array,
	      default: function() {
	        return []
	      }
	  }
  },
  data() {
    return {
      taskLogs: this.logs
    }
  },
	watch: {
      'logs' : {
	      handler(val) {
	  		this.taskLogs = val
	      },
	      //immediate: true, // 初次监听即执行
	      deep: true
	    }
    },
  methods: {
    
  },
  created() {
    
  }
}
</script>
<style scoped>

</style>